package com.fowo.api.model.requisition;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 调拨单 导入导出辅助模型 */
@Getter
@Setter
public class RequisitionExcelPo {

  @Size(max = 50, message = "调拨单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "调拨单号")
  private String rqtSn;

  @NotNull(message = "出库仓库不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*出库仓库")
  private String widName;

  @ExcelIgnore
  @ExcelProperty(value = "*出库仓库")
  private Long wid;

  @NotNull(message = "入库仓库不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*入库仓库")
  private String toWidName;

  @ExcelIgnore
  @ExcelProperty(value = "*入库仓库")
  private Long toWid;

  @EnumsString(
    value = { "待配货", "待调拨", "待收货", "已完成", "已撤销", "待审批" },
    message = "单据状态的可用值为 “待配货”, “待调拨”, “待收货”, “已完成”, “已撤销”, “待审批” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单据状态")
  private String status;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
